package com.ashley.day_0405;

import java.util.Scanner;

public class SwitchCaseTest {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		System.out.println("请输入2019年的month:");
		int month = scan.nextInt();
		System.out.println("请输入2019年的day");
		int day = scan.nextInt();
		int sumDays = 0;

		switch (month) {
		case 12:
			sumDays += 30;
		case 11:
			sumDays += 31;
		case 10:
			sumDays += 30;
		case 9:
			sumDays += 31;
		case 8:
			sumDays += 31;
		case 7:
			sumDays += 30;
		case 6:
			sumDays += 31;
		case 5:
			sumDays += 30;
		case 4:
			sumDays += 31;
		case 3:
			sumDays += 28;
		case 2:
			sumDays += 31;
		case 1:
			sumDays += day;
			break;
		}

		System.out.println("2019年" + month + "月" + day + "日，是当年的第" + sumDays + "天。");
	}

}
